package day05;
//此类是用于验证数组的demo
public class Test01 {
    public static void main(String[] args) {
        int [] c = new int[5];   //声明一个名字为c的数组，有5个值
        c[0] = 80;
        c[1] = 100;
        c[2] = 60;
        c[3] = 20;
        System.out.println(c[1]);   //输出c数组下标为1的元素值
        c[4] = 66;
//        c[5] = 99;   //报错，index 5 out of bounds for length5 下表超出数组范围

        //定义静态数组，创建数组的时候就要想好存储的数据
        int [] a = new int[]{1,2,3,4,5};
        int [] b = {1,2,3,4,5};
        System.out.println(a[3]);  //打印出的内存地址
    }
}
